package com.isoft.illustrationsdraw.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.isoft.illustrationsdraw.entity.CommissionInfo;
import com.isoft.illustrationsdraw.service.CommissionInfoService;
import com.isoft.illustrationsdraw.mapper.CommissionInfoMapper;

@Service
public class CommissionInfoServiceImpl extends ServiceImpl<CommissionInfoMapper, CommissionInfo> implements CommissionInfoService {
    
    @Override
    public CommissionInfo getCommissionInfoByUserId(Long userId) {
        QueryWrapper<CommissionInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id", userId);

        return getOne(queryWrapper);
    }
}
